#ifndef TEXTEDITOR_H
#define TEXTEDITOR_H

#include <QString>
#include <QByteArray>
#include <QTextCodec>

class TextEditor
{
	public:
		TextEditor();
		QString MessageTextProcessing(bool isTx, QString rawData, QString from, QString with, QString fileName = "");
		QString ReceiveMessageTextProcessing(QByteArray stream);
		QString LogReadTextProcessing(QByteArray rawData);
		QString LogWriteTextProcessing(QString rawData, bool isTx);
		QString GetCurrentTimeforLog();
	private:
		QTextCodec *_dec;
		QTextCodec *_enc;
};

TextEditor *GetTextEditor();
#define TEXT_EDITOR (GetTextEditor())

#endif // TEXTEDITOR_H
